package com.usian.common.model.questions;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Transient;
import java.util.Date;

/**
 * @projectName: day05_mohongwei_parent
 * @package: com.jiyun.common.model
 * @className: Questions
 * @author: 莫洪维
 * @email: 1204315800@qq.com
 * @description: TODO
 * @date: 2023/8/7 11:27
 */
@Data
@ToString
@TableName(value = "questions")
public class Questions {
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    @TableField(value = "questions_no")
    private String questionsNo;
    @TableField(value = "questions_name")
    private String questionsName;
    @TableField(value = "questions_type_id")
    private Long questionsTypeId;
    @TableField(value = "user_id")
    private Long userId;
    @TableField(value = "create_date")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    private Date createDate;
    @TableField(value = "analysis")
    private String analysis;
    @TableField(value = "answer_sort")
    private Integer answerSort;
    @TableField(value = "score")
    private Integer score;
    @TableField(value = "is_delete")
    private Integer isDelete;

    //标签ID
    @Transient
    @TableField(exist = false)
    private String labelIds;
}
